3.220 \(\int (B \cos (c+d x)+C \cos ^2(c+d x)) \sec (c+d x) \, dx\)

Optimal. Leaf size=15 \[ B x+\frac {C \sin (c+d x)}{d} \]

[Out]

B*x+C*sin(d*x+c)/d

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {3010, 2637} \[ B x+\frac {C \sin (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x],x]

[Out]

B*x + (C*Sin[c + d*x])/d

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3010

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x
_Symbol] :> Dist[1/b, Int[(b*Sin[e + f*x])^(m + 1)*(B + C*Sin[e + f*x]), x], x] /; FreeQ[{b, e, f, B, C, m}, x
]

Rubi steps

\begin {align*} \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx &=\int (B+C \cos (c+d x)) \, dx\\ &=B x+C \int \cos (c+d x) \, dx\\ &=B x+\frac {C \sin (c+d x)}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 26, normalized size = 1.73 \[ B x+\frac {C \sin (c) \cos (d x)}{d}+\frac {C \cos (c) \sin (d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x],x]

[Out]

B*x + (C*Cos[d*x]*Sin[c])/d + (C*Cos[c]*Sin[d*x])/d

________________________________________________________________________________________

fricas [A]  time = 0.51, size = 17, normalized size = 1.13 \[ \frac {B d x + C \sin \left (d x + c\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c),x, algorithm="fricas")

[Out]

(B*d*x + C*sin(d*x + c))/d

________________________________________________________________________________________

giac [B]  time = 0.35, size = 39, normalized size = 2.60 \[ \frac {{\left (d x + c\right )} B + \frac {2 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c),x, algorithm="giac")

[Out]

((d*x + c)*B + 2*C*tan(1/2*d*x + 1/2*c)/(tan(1/2*d*x + 1/2*c)^2 + 1))/d

________________________________________________________________________________________

maple [A]  time = 0.10, size = 21, normalized size = 1.40 \[ \frac {C \sin \left (d x +c \right )+B \left (d x +c \right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c),x)

[Out]

1/d*(C*sin(d*x+c)+B*(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 20, normalized size = 1.33 \[ \frac {{\left (d x + c\right )} B + C \sin \left (d x + c\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c),x, algorithm="maxima")

[Out]

((d*x + c)*B + C*sin(d*x + c))/d

________________________________________________________________________________________

mupad [B]  time = 0.98, size = 17, normalized size = 1.13 \[ \frac {C\,\sin \left (c+d\,x\right )+B\,d\,x}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*cos(c + d*x) + C*cos(c + d*x)^2)/cos(c + d*x),x)

[Out]

(C*sin(c + d*x) + B*d*x)/d

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (B + C \cos {\left (c + d x \right )}\right ) \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*cos(d*x+c)+C*cos(d*x+c)**2)*sec(d*x+c),x)

[Out]

Integral((B + C*cos(c + d*x))*cos(c + d*x)*sec(c + d*x), x)

________________________________________________________________________________________